SYSENT.DLL FUNCTION: SysEntry C function definition: int FAR PASCAL _export SysEntry (LPSTR ItemName) Function Information: SysEntry assigns the text from the highlighted list box entry to the variable ItemName. SysEntry returns the length of the text assigned to ItemName. If an error occurred the return value is 0. NOTE: The Variable (ItemName) must be initialized before calling SysEntry. Macro Syntax: ItemName:="" // Initialize Variable for List entry DLLLOAD ( Link; "c:\wpwin\macros\sysent.dll") DLLCALL ( Link; "SysEntry"; ReturnValue:WORD;{ ADDRESS( ItemName)} DLLFREE (Link) Values Returned: ReturnValue = Length of string assigned to FontName, or 0 on error. ItemName = Text of current list box entry. Example Macro: // This uses SYSENT.DLL to create a list of fonts Application (wp;wpwp;default) // Initialize Variables FontName:="" OldName:="" // Load SYSENT.DLL. Path should be path to SYSENT.DLL DllLoad (Link;"C:\WPWIN\MACROS\SYSENT.DLL") FileNew() // Open New file for list InhibitInput (Off!) SendKeys Wait ("|A'oo'";0) // Open Font Dialog SendKeys Wait ("|H";0) // Go to top of list // Loop to get all font names Label(Top@) // Get Font Name DllCall(Link;"SysEntry";ReturnVal:WORD;{ADDRESS(FontName)}) // Check for last font or error if ((OldName = FontName) OR (ReturnVal = 0)) Go(Exit@) EndIf Font(FontName;Size;Yes!) // Insert Font Code in document Type(FontName) // Type font name in document HardReturn() SendKeys Wait ("|D";0) // Go to next font OldName:=FontName // Make copy of current font name for if checking Go(Top@) // Continue loop for next font // Exit routine Label(Exit@) DllFree(Link) // Free SYSENT.DLL SendKeys Wait ("|027";0) // Cancel out of Font Dialog PosDocTop()